/**
 * @author  ：fangjj 
 * @version ：2009-2-17 上午10:35:10
 */
package com.sendinfo.xspring.exception;
/**
 * @author 作者：fangjj E-mail:fangjianjiang725@163.com
 * @version 创建时间：2009-2-17 上午10:35:10
 * 类说明
 */
public class XspringEnum
{
	public final static XspringError E1000 = new XspringError("1000", "配置文件读取错误");   
    public final static XspringError E2000 = new XspringError("2000", "建立全量文本数据索引出错");
    public final static XspringError E2001 = new XspringError("2001", "建立曾量文本数据索引出错");
    public final static XspringError E3000 = new XspringError("3000", "配置文件读取错误"); 
    public final static XspringError E3001 = new XspringError("3001", "定时器配置出错(没有填写时间间隔)");
    
    public final static XspringError getError(String errorCode) throws XspringRuntimeException {   
        try {   
            return (XspringError) new XspringEnum().getClass().getDeclaredField(   
                    "E" + errorCode).get(new XspringEnum());   
  
        } catch (Exception e) {   
            throw new XspringRuntimeException(XspringEnum.E1000);   
        }   
  
    }   
}
